package it.gestoreContratti.gui.frames;

import it.gestoreContratti.entity.Contratto;
import it.gestoreContratti.gui.panels.VisualizzaContrattoPanel;

import java.awt.GridBagConstraints;
import java.awt.GridBagLayout;

import javax.swing.JFrame;
import javax.swing.JPanel;
import javax.swing.border.EmptyBorder;

public class VisualizzaContrattoFrame extends JFrame {

	
	
	
	private static final long serialVersionUID = 7185192024195649623L;
	private JPanel contentPane;	

	
	public VisualizzaContrattoFrame(Contratto contratto) {		
		setTitle("Dettaglio Contratto Numero: "+contratto.getNumero().toString());
		setResizable(false);
		setDefaultCloseOperation(JFrame.HIDE_ON_CLOSE);
		setSize(800, 600);
		contentPane = new JPanel();
		contentPane.setBorder(new EmptyBorder(5, 5, 5, 5));
		setContentPane(contentPane);
		GridBagLayout gbl_contentPane = new GridBagLayout();
		gbl_contentPane.columnWidths = new int[]{0, 0};
		gbl_contentPane.rowHeights = new int[]{0, 0};
		gbl_contentPane.columnWeights = new double[]{1.0, Double.MIN_VALUE};
		gbl_contentPane.rowWeights = new double[]{1.0, Double.MIN_VALUE};
		contentPane.setLayout(gbl_contentPane);
		
		VisualizzaContrattoPanel visualizzaContrattoPanel = new VisualizzaContrattoPanel(contratto);
		GridBagConstraints gbc_visualizzaContrattoPanel = new GridBagConstraints();
		gbc_visualizzaContrattoPanel.fill = GridBagConstraints.BOTH;
		gbc_visualizzaContrattoPanel.gridx = 0;
		gbc_visualizzaContrattoPanel.gridy = 0;
		contentPane.add(visualizzaContrattoPanel, gbc_visualizzaContrattoPanel);
	}

	
	
	

}
